package lp.xian.equipment.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.domain.Supplier;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 设备列表对象 lp_equipment
 *
 * @author ruoyi
 * @date 2023-06-29
 */
@Data
public class Equipment extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键递增 */
    private Integer equipmentId;

    /** 设备名称 */
    @Excel(name = "设备名称")
    private String equipmentName;

    /** 设备数量 */
    @Excel(name = "设备数量")
    private Integer nums;

    /** 排序 */
    @Excel(name = "排序")
    private Integer sort;

    /** 设备分类 */
    @Excel(name = "设备分类")
    private Integer classificationId;

    /** 设备价格 */
    @Excel(name = "设备价格")
    private BigDecimal price;

    /** 供应商id */
    @Excel(name = "供应商id")
    private Integer supplierId;

    /** 注意事项 */
    @Excel(name = "注意事项")
    private String matter;

    /** 保养周期 */
    @Excel(name = "保养周期")
    private String maintain;

    /** 设备描述 */
    @Excel(name = "设备描述")
    private String description;

    /** 0表示设备正常1表示设备保养2表示设备维修3表示设备损坏 */
    @Excel(name = "0表示设备正常1表示设备保养2表示设备维修3表示设备损坏")
    private Integer equipmenStatus;

    /** 0表示未审核1表示审核2表示审批 */
    @Excel(name = "0表示未审核1表示审核2表示审批")
    private Integer auditStatus;

    /** 审核意见 */
    @Excel(name = "审核意见")
    private String auditOpinion;

    /** 审核时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date auditTime;

    /** 审核人员 */
    @Excel(name = "审核人员")
    private String auditPerson;

    /** 审批意见 */
    @Excel(name = "审批意见")
    private String approverOpinion;

    /** 审批时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date approverTime;

    /** 审批人员 */
    @Excel(name = "审批人员")
    private String approverPerson;

    private Classification classification;

    private Supplier supplier;



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("equipmentId",getEquipmentId())
                .append("equipmentName", getEquipmentName())
                .append("nums", getNums())
                .append("sort", getSort())
                .append("classificationId", getClassificationId())
                .append("price", getPrice())
                .append("supplierId", getSupplierId())
                .append("matter", getMatter())
                .append("maintain", getMaintain())
                .append("description", getDescription())
                .append("equipmenStatus", getEquipmenStatus())
                .append("auditStatus", getAuditStatus())
                .append("auditOpinion", getAuditOpinion())
                .append("auditTime", getAuditTime())
                .append("auditPerson", getAuditPerson())
                .append("approverOpinion", getApproverOpinion())
                .append("approverTime", getApproverTime())
                .append("approverPerson", getApproverPerson())
                .append("remark", getRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }


}
